home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
examples.lha
/
Examples
/
AMOK
/
IntuiPointer
/
IntuiPointer.mod
next >
Wrap
Text File
|
1995-04-27
|
15KB
|
309 lines
(*---------------------------------------------------------------------------
:Program. IntuiPointer.mod
:Contents. Prozeduren zum Setzen des Mauszeigers auf 'Busy' (ZZ)
:Author. Bernd Preusing
:Address. Gerhardstr. 16 D-2200 Elmshorn
:Phone. 04121/22486
:Copyright. Public Domain
:Language. Oberon-2
:Translator. Amiga Oberon 2.42d
:Translator. Oberon-A 5.13
:History. V1.0, 08-Oct-89, Bernd Preusing
:History. V1.1, 10-Jan-90, [bne]: original (ZZ).-Image
:History. V1.2, 10-Jan-92, Christian Stiens: original OS2.0 BusyPointer
:History. V1.3, 06-Oct-92, Christian Stiens: animated busy pointer
:History. V1.3 11-Jun-93 [hG] supports 3.0 internal busy pointer
:History. V1.4, 23-Jan-95 [fjc] merged Christian's and Hartmut's
:History. versions, and added Oberon-A code.
:Bugs. none
:Remark. Please, create beautiful pointers for me!
---------------------------------------------------------------------------*)
(* $CLEAR OberonA *)
(* <*IF OberonA THEN*> $IF OberonA *)
(* <*STANDARD-*> <*MAIN-*> <*INITIALISE-*> *)
(* <*END*> $END *)
MODULE IntuiPointer;
IMPORT
(* <*IF OberonA THEN*> $IF OberonA *)
SYS := SYSTEM,
Kernel,
e := Exec,
(* <*END*> $END *)
I := Intuition,
u := Utility;
(* <*IF OberonA THEN*> $IF OberonA *)
TYPE Data = ARRAY 36 OF INTEGER; DataPtr = POINTER [2] TO Data;
CONST ClockDataStr =
"\x00\x00\x00\x00"
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xEC\x3F\xF8\x7F\xDE\x3F\xF8\x7F\xBE"
"\x7F\xFC\xFF\x7F\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00";
TYPE Data2 = ARRAY 16,36 OF INTEGER; Data2Ptr = POINTER [2] TO Data2;
CONST AnimClockDataStr =
"\x00\x00\x00\x00" (* 00 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1E\xF8\x1F\xF0\x3E\xFC\x3F\xF8\x7E\xFE\x3F\xF8\x7E\xFE"
"\x7F\xFC\xFE\xFF\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 01 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xB8\x1F\xF0\x3F\xBC\x3F\xF8\x7F\x7E\x3F\xF8\x7F\x7E"
"\x7F\xFC\xFE\xFF\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 02 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xEC\x3F\xF8\x7F\xDE\x3F\xF8\x7F\xBE"
"\x7F\xFC\xFF\x7F\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 03 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xFC\x3F\xF8\x7F\xFE\x3F\xF8\x7F\xE6"
"\x7F\xFC\xFF\x9F\x7E\xFC\xFF\x7F\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 04 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xFC\x3F\xF8\x7F\xFE\x3F\xF8\x7F\xFE"
"\x7F\xFC\xFF\xFF\x7E\xFC\xFF\x03\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 05 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xFC\x3F\xF8\x7F\xFE\x3F\xF8\x7F\xFE"
"\x7F\xFC\xFF\xFF\x7E\xFC\xFF\x7F\x7F\xFC\xFF\x9F\x3F\xF8\x7F\xE6"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 06 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x3F\xFC\x3F\xF8\x7F\xFE\x3F\xF8\x7F\xFE"
"\x7F\xF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\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 14 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1F\xF8\x1F\xF0\x2F\xFC\x3F\xF8\x77\xFE\x3F\xF8\x7B\xFE"
"\x7F\xFC\xFD\xFF\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00"
"\x00\x00\x00\x00" (* 15 *)
"\x04\x00\x07\xC0\x00\x00\x07\xC0\x01\x00\x03\x80\x00\x00\x07\xE0"
"\x07\xC0\x1B\xF8\x1F\xF0\x3B\xFC\x3F\xF8\x7D\xFE\x3F\xF8\x7D\xFE"
"\x7F\xFC\xFE\xFF\x7E\xFC\xFF\xFF\x7F\xFC\xFF\xFF\x3F\xF8\x7F\xFE"
"\x3F\xF8\x7F\xFE\x1F\xF0\x3F\xFC\x07\xC0\x1F\xF8\x00\x00\x07\xE0"
"\x00\x00\x00\x00";
VAR
ClockData : DataPtr;
AnimClockData : Data2Ptr;
(*------------------------------------*)
PROCEDURE InitData;
BEGIN (* InitData *)
Kernel.Allocate (ClockData, SIZE (Data), {e.chip});
SYS.MOVE (SYS.ADR (ClockDataStr), ClockData, SIZE (Data));
Kernel.Allocate (AnimClockData, SIZE (Data2), {e.chip});
SYS.MOVE (SYS.ADR (AnimClockDataStr), AnimClockData, SIZE (Data2));
END InitData;
(* <* ELSE *> $ELSE *)
(* $DataChip+ *)
TYPE Data = ARRAY 36 OF INTEGER;
CONST ClockData = Data(
00000U,00000U,
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FECU, 03FF8U,07FDEU, 03FF8U,07FBEU,
07FFCU,0FF7FU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U);
TYPE Data2 = ARRAY 16,36 OF INTEGER;
CONST AnimClockData = Data2(
00000U,00000U, (* 00 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01EF8U, 01FF0U,03EFCU, 03FF8U,07EFEU, 03FF8U,07EFEU,
07FFCU,0FEFFU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 01 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FB8U, 01FF0U,03FBCU, 03FF8U,07F7EU, 03FF8U,07F7EU,
07FFCU,0FEFFU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 02 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FECU, 03FF8U,07FDEU, 03FF8U,07FBEU,
07FFCU,0FF7FU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 03 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FE6U,
07FFCU,0FF9FU, 07EFCU,0FF7FU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 04 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FF03U, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 05 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FF7FU, 07FFCU,0FF9FU, 03FF8U,07FE6U,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 06 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FFFFU, 07FFCU,0FF7FU, 03FF8U,07FBEU,
03FF8U,07FDEU, 01FF0U,03FECU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 07 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FFFFU, 07FFCU,0FEFFU, 03FF8U,07F7EU,
03FF8U,07F7EU, 01FF0U,03FBCU, 007C0U,01FB8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 08 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FFFFU, 07FFCU,0FEFFU, 03FF8U,07EFEU,
03FF8U,07EFEU, 01FF0U,03EFCU, 007C0U,01EF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 09 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FFFFU, 07FFCU,0FEFFU, 03FF8U,07DFEU,
03FF8U,07DFEU, 01FF0U,03BFCU, 007C0U,01BF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 10 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FFFFU, 07FFCU,0FDFFU, 03FF8U,07BFEU,
03FF8U,077FEU, 01FF0U,02FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 11 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,0FDFFU, 07FFCU,0F3FFU, 03FF8U,04FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 12 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,07FFEU,
07FFCU,0FFFFU, 07EFCU,081FFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 13 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,03FFCU, 03FF8U,07FFEU, 03FF8U,04FFEU,
07FFCU,0F3FFU, 07EFCU,0FDFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 14 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01FF8U, 01FF0U,02FFCU, 03FF8U,077FEU, 03FF8U,07BFEU,
07FFCU,0FDFFU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U,
00000U,00000U, (* 15 *)
00400U,007C0U, 00000U,007C0U, 00100U,00380U, 00000U,007E0U,
007C0U,01BF8U, 01FF0U,03BFCU, 03FF8U,07DFEU, 03FF8U,07DFEU,
07FFCU,0FEFFU, 07EFCU,0FFFFU, 07FFCU,0FFFFU, 03FF8U,07FFEU,
03FF8U,07FFEU, 01FF0U,03FFCU, 007C0U,01FF8U, 00000U,007E0U,
00000U,00000U);
(* <*END*> $END *)
PROCEDURE Normal* (win: I.WindowPtr);
BEGIN
IF I.int.libNode.version >= 39 THEN
I.SetWindowPointer(win,u.done);
ELSE
I.ClearPointer(win);
END;
END Normal;
PROCEDURE Busy* (win: I.WindowPtr);
BEGIN
IF I.int.libNode.version >= 39 THEN
I.SetWindowPointer(win,I.waBusyPointer,I.LTRUE,
I.waPointerDelay,I.LTRUE,
u.done);
ELSE
I.SetPointer(win,ClockData^,16,16,-6,0);
END;
END Busy;
PROCEDURE AnimBusy* (win: I.WindowPtr; num: INTEGER);
BEGIN
I.SetPointer(win,AnimClockData[num MOD 16],16,16,-6,0);
END AnimBusy;
(* <*IF OberonA THEN*> $IF OberonA *)
BEGIN InitData
(* <*END*> $END *)
END IntuiPointer.